<div class="tab-box">
    <ul>
        <li ng-repeat="(i,item) in tabMenu.children track by $index" 
        	ui-sref="{{item.state}}({id:item.id})"
        	ng-class="{active:i==0}">
        	{{item.name}}
        </li>
    </ul>
</div>

<div class="section-search">
	<span class="line-block">
        <ui-datepicker error-tis="" placeholder="开始时间" ng-model="params.start_time"></ui-datepicker>
    </span>
	<span class="line-block">
        <ui-datepicker  placeholder="结束时间" ng-model="params.end_time"></ui-datepicker>
    </span>
	<span class="line-block">
        <ui-select ng-model="params.status">
        	<ui-option value="-1">订单状态</ui-option>
            <ui-option ng-repeat="(i,item) in param1.stateList track by $index " value="item.id" >
            	{{item.s_name}}
            </ui-option>
        </ui-select>
   </span>
    <span class="line-block">
        <ui-select ng-model="params.loan_type" placeholder="产品类型">
        	<ui-option value="-1">产品类型</ui-option>
            <ui-option value="1">车贷</ui-option>
            <ui-option value="2">房贷</ui-option>
            <ui-option value="3">信贷</ui-option>
        </ui-select>
    </span>
    <span class="line-block">
        <ui-select ng-model="params.at_id">
            <ui-option value="-1">贷款期限</ui-option>
            <ui-option ng-repeat="(i,item) in param1.applyTermList track by $index " value="item.id" >
            	{{item.at_name}}
            </ui-option>
        </ui-select>
    </span>
    <span class="line-block filed">
        <ui-select ng-model="params.type" error-tis="err.type">
            <ui-option value="-1">选择字段</ui-option>
            <ui-option value="1">借款编号</ui-option>
            <ui-option value="2">客户姓名</ui-option>
            <ui-option value="3">身份证</ui-option>
            <ui-option value="4">电话号码</ui-option>
            <ui-option value="5">业务员</ui-option>
        </ui-select>
    </span>
    <span class="line-block" style="width: 136px;">
        <input type="text" class="form-control" placeholder="请先选择左侧要搜索的字段" ng-model="params.keyword" />
    </span>
    <span class="line-block">
        <button class="btn btn-success search-btn" ng-click="searchHandle()"><em class="glyphicon glyphicon-search"></em></button>
    </span>
    <span class="line-block">
        <button class="btn btn-success search-btn" style="background:#cf5857" ng-click="todayGather()">今日收款</button>
    </span>
    <span class="line-block">
        <button class="btn btn-success search-btn" style="background:#2f3847" ui-sref="loanlater.plan">回款计划</button>
    </span>
</div>
<div class="dataList">
    <table class="table">
        <thead>
        <tr>
        	<th width="70">
                <label><input ng-disabled="param1.dataList.length<1" class="ver-top" type="checkbox" ng-checked="allCheck" ng-click="$_fn.ch_id_all($event,'ch_id')">全选</label>
            </th>
            <th width="120">操作</th>
            <th>最近还款日</th>
            <th>已收/总期数</th>
            <th>贷款金额</th>
            <th>应收总额</th>
            <th>订单状态</th>
            <th>订单编号</th>
            <th>产品类型</th>
            <th>借款人</th>
            <th>填单人员</th>
            <th>创单时间</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-if="param1.dataList.length<1" class="_loading">
            <td colspan="20">
                <div class="no_data">暂时找不到数据</div>
            </td>
        </tr>
        <tr ng-repeat="(i,item) in param1.dataList track by $index " ng-click="$_fn.tabClick($event)">
            <td>
              <input type="checkbox" name="ch_id" value="{{item.id}}">
            </td>
            <td>
                <dropdown placeholder="请选择" ng-click="$event.stopPropagation();">
                    <li ng-repeat="(i,list) in subMenu track by $index" ng-if="list.state!=-1" 
                    	ng-click="operation(list.path,{loan_number:item.loan_number,fp_id:item.fp_id,loan_type:item.loan_type,id:item.id,oid:item.id,s_id:item.sid,nowPage:'trace',logs_type:'1',recive_name:item.real_name,phone:item.phone,pid:item.pid})">
                    	{{list.name}}
                    </li>
                </dropdown>
            </td>
            <td>{{item.repayment_time}}</td>
            <td>{{item.periods[1]}}/{{item.all_term}}</td>
            <td>{{item.loan_money  | toRMB}}</td>
            <td>{{item.receivables  | toRMB}}</td>
            <td>{{item.status}}</td>
            <td>{{item.loan_number}}</td>
            <td ng-init="loan_types=['','车贷','房贷','信贷']">{{loan_types[item.loan_type]}}</td>
            <td>{{item.personal_names}}</td>
            <td>{{item.add_personal}}</td>
            <td>{{item.create_time}}</td>
        </tr>
        </tbody>
    </table>
</div>
<div class="page" ng-if="param1.dataList.length>0">
    <div class="operation">
        <label><input type="checkbox"  ng-click="$_fn.ch_id_all($event,'ch_id')">全选</label>
        <!--<dropdown placeholder="批量操作">
            <li>批量删除</li>
            <li>批量撤销</li>
        </dropdown>-->
        <dropdown placeholder="批量操作" ng-click="$event.stopPropagation();">
          <li ng-repeat="(i,items) in subMenu track by $index" ng-if="items.state==-1" ng-click="operation(items.path, {batchOper:'true'})">{{items.name}}</li>
      </dropdown>
    </div>
    <pages total="{{param1.orderList.total}}" current="param1.orderList.pageNum" page-size="{{param1.orderList.pageSize}}"></pages>
</div>
